package com.gmsi_prototype;

/**
 *   This serves as an interface for the individual sensor classes, providing the guidelines for how they should be written.
 */

public interface ISensor
{
    /**
     * Connects to a sensor device
     */
    public void connect();

    /**
     * Disconnects the sensor from the device and does any necessary cleanup.
     */
    public void disconnect();

    /**
     * Obtains a float for the raw data value output by a sensor.
     * @param sensorName The name of which sensor (assuming the device has multiple) to retrieve raw data from
     * @throws IllegalArgumentException If an invalid sensorName is input as a parameter.
     * @returns Data retrieved from the sensor, as a double (if the sensor returns an integer, it will be converted to a double)
     */
    public double getRawData(String sensorName) throws IllegalArgumentException;

    /**
     * 	Obtains the general stress level that the data portrays.
     *  @param sensorName A string array denoting which sensors (assuming the device has multiple) to read from
     *	@returns A double in the range [0, 100] denoting the overall stress level (0 being completely stress-free and 100 being extremely stressed)
     */
    public int getAdjustedData(String[] sensorNames) throws IllegalArgumentException;

    /**
     *   getSensorList
     *      purpose: get a list of the names of all sensors available on this device; these are the possible parameters for getRawData and getAdjustedData
     *      @returns A string array of the names of sensors available for reading frome this device
     */
    public String[] getSensorList();
}